The Val (str) function reads a string containing Numbers (example: an address, phone number, or social security number) and converts them to a decimal value. Val stops reading the string when it finds the first character in the string that it finds that it can not recognize as a number or as a space.
Use this function to extract only the numeric portion of a string that contains both numbers and text. For instance, you can extract only the street number from an address, or only the numeric portion of an ID that contains letters and numbers.
The following example is applicable to both Basic and Crystal syntax:
This function is designed to work like the Visual Basic function of the same name.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |